home *** CD-ROM | disk | FTP | other *** search
-
-
-
- sssspppprrrroooodddd1111dddduuuu,,,,ddddpppprrrroooodddd1111dddduuuu((((3333FFFF)))) sssspppprrrroooodddd1111dddduuuu,,,,ddddpppprrrroooodddd1111dddduuuu((((3333FFFF))))
-
-
-
- NNNNAAAAMMMMEEEE
- sssspppprrrroooodddd1111dddduuuu,,,, ddddpppprrrroooodddd1111dddduuuu ---- Compute the product of a 1D Fourier transform with a
- 1D filter.
-
- SSSSYYYYNNNNOOOOPPPPSSSSYYYYSSSS
- _F_o_r_t_r_a_n :
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee sssspppprrrroooodddd1111dddduuuu(((( nnnn,,,, aaaarrrrrrrraaaayyyy,,,, iiiinnnnccccaaaa,,,, ffffiiiilllltttteeeerrrr,,,, iiiinnnnccccffff))))
- iiiinnnntttteeeeggggeeeerrrr nnnn,,,, pppp,,,, iiiinnnnccccaaaa,,,, iiiinnnnccccffff
- rrrreeeeaaaallll aaaarrrrrrrraaaayyyy((((0000::::((((nnnn----1111))))****iiiinnnnccccaaaa)))),,,, ffffiiiilllltttteeeerrrr((((0000::::((((nnnn----1111))))****iiiinnnnccccffff))))
-
- ssssuuuubbbbrrrroooouuuuttttiiiinnnneeee ddddpppprrrroooodddd1111dddduuuu(((( nnnn,,,, aaaarrrrrrrraaaayyyy,,,, iiiinnnnccccaaaa,,,, ffffiiiilllltttteeeerrrr,,,, iiiinnnnccccffff))))
- iiiinnnntttteeeeggggeeeerrrr nnnn,,,, pppp,,,, iiiinnnnccccaaaa,,,, llllddddaaaa,,,, iiiinnnnccccffff,,,, llllddddffff
- rrrreeeeaaaallll****8888 aaaarrrrrrrraaaayyyy((((0000::::((((nnnn----1111))))****iiiinnnnccccaaaa)))),,,, ffffiiiilllltttteeeerrrr((((0000::::((((nnnn----1111))))****iiiinnnnccccffff))))
-
-
- _C :
- ####iiiinnnncccclllluuuuddddeeee <<<<fffffffftttt....hhhh>>>>
- iiiinnnntttt sssspppprrrroooodddd1111dddduuuu((((iiiinnnntttt nnnn,,,, ffffllllooooaaaatttt ****aaaarrrrrrrraaaayyyy,,,, iiiinnnntttt iiiinnnnccccaaaa,,,,
- ffffllllooooaaaatttt ****ffffiiiilllltttteeeerrrr,,,, iiiinnnntttt iiiinnnnccccffff))));;;;
- iiiinnnntttt ddddpppprrrroooodddd1111dddduuuu((((iiiinnnntttt nnnn,,,, ddddoooouuuubbbblllleeee ****aaaarrrrrrrraaaayyyy,,,,iiiinnnntttt iiiinnnnccccaaaa,,,,
- ddddoooouuuubbbblllleeee ****ffffiiiilllltttteeeerrrr,,,, iiiinnnntttt iiiinnnnccccffff))));;;;
-
-
- DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
- sssspppprrrroooodddd1111dddduuuu and ddddpppprrrroooodddd1111dddduuuu compute the product of the Fourier transforms of a
- real sequence of N samples with the Fourier transforms of a real filter.
- Note, the product of the Fourier transforms of two sequences is equal to
- the Fourier transform of their convolution.
-
-
- PPPPAAAARRRRAAAAMMMMEEEETTTTEEEERRRRSSSS
- NNNN Integer, the number of samples in each sequence.
- Unchanged on exit. AAAARRRRRRRRAAAAYYYY Array containing the Fourier Transform. On
- exit, the array is overwritten by the product.
-
- IIIINNNNCCCCAAAA Integer, increment between two consecutive elements of the sequence.
- Unchanged on exit.
-
- FFFFIIIILLLLTTTTEEEERRRR Array containing the Fourier Transform of the filter(s).
- Unchanged on exit.
-
- IIIINNNNCCCCFFFF Integer, increment between two consecutive elements of the filter.
- Unchanged on exit.
-
-
- EEEExxxxaaaammmmpppplllleeee ooooffff CCCCaaaalllllllliiiinnnngggg SSSSeeeeqqqquuuueeeennnncccceeee
- Working on a sequences of 1024 real values. We successively apply a
- Direct Fourier Transform, the product with a filter transform, then an
- Inverse Fourier Transform-
- Elements of each sequence are stored with increment (stride)1.
- _F_o_r_t_r_a_n
- real array(0:1026-1), filter(0:1026-1), coeff(1024+15)
-
-
-
- PPPPaaaaggggeeee 1111
-
-
-
-
-
-
- sssspppprrrroooodddd1111dddduuuu,,,,ddddpppprrrroooodddd1111dddduuuu((((3333FFFF)))) sssspppprrrroooodddd1111dddduuuu,,,,ddddpppprrrroooodddd1111dddduuuu((((3333FFFF))))
-
-
-
- call scfft1dui( 1024, coeff)
- call scfft1du( -1, 1024, array, 1, coeff)
- ccccaaaallllllll sssspppprrrroooodddd1111dddduuuu(((( 1111000022224444,,,, aaaarrrrrrrraaaayyyy,,,, 1111,,,, ffffiiiilllltttteeeerrrr,,,,
- call csfft1du( 1, 1024, array, 1, coeff)
-
- _C
- #include <fft.h>
- float array[1026], filter[1026], *coeff;
- coeff = scfft1dui( 1024, NULL);
- scfft1du( -1, 1024, array, 1, coeff);
- sssspppprrrroooodddd1111dddduuuu(((( 1111000022224444,,,, aaaarrrrrrrraaaayyyy,,,, 1111,,,, ffffiiiilllltttteeeerrrr,,,, 1111))));;;;
- csfft1du( -1, 1024, array, 1, coeff);
-
- NNNNOOOOTTTTEEEE____1111 :::: Using a 0 leading dimension for the filter is equivalent to
- applying the same filter to all the input sequences.
-
- NNNNOOOOTTTTEEEE____2222 :::: As the FFTs are not normalized, a successive direct, then
- inverse transform, scales the original input by the size of the sequence.
- Rather than calling sscal1d or dscal1d to scale back the result, this
- scaling factor could be directly applied to the filter transform, thus
- saving some extra work.
-
- SSSSEEEEEEEE AAAALLLLSSSSOOOO
- fft, scfft1dui, dzfft1dui, scfft1du, dzfft1du, sprod1du, dprod1du,
- sscal1d, dscal1d
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- PPPPaaaaggggeeee 2222
-
-
-
-